<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<link rel="shortcut icon" type="image/x-icon" href="favicon.ico"/>
<title>DynamoRIO API: Graphical Application Framework</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">DynamoRIO API
   </div>
  </td>
   <td>        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
</td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.1.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('page_drgui.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Macros</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark">&#160;</span>Groups</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(10)"><span class="SelectionMark">&#160;</span>Pages</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">Graphical Application Framework </div>  </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><p>The <code>drgui</code> DynamoRIO Extension provides a DynamoRIO independent graphical application framework that can be used to provide a front-end for a DynamoRIO Extension or tool.</p>
<p>Plugins must use Qt 5 to maintain compatibility with <code>drgui</code> because Qt 5 is <b>not</b> backwards compatible.</p>
<ul>
<li><a class="el" href="page_drgui.html#sec_drgui_setup">Setup</a></li>
<li><a class="el" href="page_drgui.html#sec_drgui_plugin_layout">Plugin Layout</a></li>
<li><a class="el" href="page_drgui.html#sec_drgui_distribution">Distribution</a></li>
</ul>
<h1><a class="anchor" id="sec_drgui_setup"></a>
Setup</h1>
<p>To use <code>drgui</code> with your plugin simply include this line in your plugin's CMakeLists.txt file:</p>
<div class="fragment"><div class="line"> use_DynamoRIO_extension(clientname drgui) </div>
</div><!-- fragment --><p>That will automatically set up the include path and library dependence.</p>
<p>Your plugin should be built with cmake in order to maintain compatibility with the rest of DynamoRIO. For details on this, see the Qt documentation <a href="http://qt-project.org/quarterly/view/using_cmake_to_build_qt_projects">here</a> and reference <code>ext/drgui/CmakeLists.txt</code> for example usage.</p>
<h1><a class="anchor" id="sec_drgui_plugin_layout"></a>
Plugin Layout</h1>
<p>The recommended method of turning a Qt application into a <code>drgui</code> plugin is to create a factory which implements <code><a class="el" href="classdrgui__tool__interface__t.html">drgui_tool_interface_t</a></code>.</p>
<p>If your plugin requires persistent preferences then implementing <code><a class="el" href="classdrgui__options__interface__t.html">drgui_options_interface_t</a></code> will create a section for the plugin in <code>drgui</code> 's preferences dialog. It is up to the author of the plugin to decide how to store the preferences. However, the recommended method is to use <a href="http://qt-project.org/doc/qt-5.0/qtcore/qsettings.html">QSettings.</a></p>
<h1><a class="anchor" id="sec_drgui_distribution"></a>
Distribution</h1>
<h2><a class="anchor" id="sec_drgui_dist_plugins"></a>
Plugins</h2>
<p><code>drgui</code> provides command line arguments that can be used to auto-load plugins. This feature can also be used to pass arguments to the plugin that is being automatically loaded.</p>
<div class="fragment"><div class="line"> drgui -t &lt;tool_name&gt; [options] </div>
</div><!-- fragment --><p>The -t option can be passed either the name of the plugin, or the location of the plugin in the file system. Any further arguments are passed to the plugin when it is loaded.</p>
<h2><a class="anchor" id="sec_drgui_dist_libraries"></a>
Libraries</h2>
<p>When distributing <code>drgui</code> and any plugins be aware of Qt's LGPL license restrictions. Namely, restrictions concerning static linking to the Qt libraries.</p>
<p>If static linking is not an option then the required Qt libraries should be packaged with the application as shared libraries. Otherwise, installing Qt 5 will be a requirement for a user.</p>
<p>Relevant documentation and examples can be found <a href="http://qt-project.org/doc/qt-5.0/qtdoc/deployment.html">here</a> and <a href="http://qt-project.org/doc/qt-5.0/qtdoc/deployment-windows.html
    #linking-the-application-to-qt-as-a-shared-library">here</a> </p>
</div></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="footer" style="float:none;text-align:center"><img border=0 src="favicon.png"> &nbsp;  DynamoRIO API version 5.0.0 --- Wed Sep 10 2014 21:36:44 &nbsp; <img border=0 src="favicon.png">
</small></address>
<!--END !GENERATE_TREEVIEW-->
</body>
</html>
